import request from '@/utils/request'

export default {

}

export function listOrder(query) {
  return request({
    url: '/user/order/list',
    method: 'get',
    params: query
  })
}
export function payType(type,tradeNo,price) {
    return request({
      url: '/user/order/pay/'+type+'/'+tradeNo+'/'+price,
      method: 'get'
    })
}
// 打开微信图片
export function openWechatImage( outTradeNo,actualPrice) {
  return request({
    url: '/user/order/wechatPay/'+outTradeNo+'/'+actualPrice,
    method: 'post'
  })
}
// 查询order详细
export function getOrder(id) {
  return request({
    url: '/user/order/' + id,
    method: 'get'
  })
}

// 新增order
export function addOrder(data) {
  return request({
    url: '/user/order',
    method: 'post',
    data: data
  })
}

// 修改order
export function updateOrder(data) {
  return request({
    url: '/user/order',
    method: 'put',
    data: data
  })
}

// 删除order
export function delOrder(id) {
  return request({
    url: '/user/order/' + id,
    method: 'delete'
  })

}
